{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 可视化数据集的分布\n",
    "\n",
    "处理一组数据时，通常要做的第一件事就是了解变量(target variable)的分布方式。本章将简要介绍seaborn中用于检查单变量和双变量分布的一些工具。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "from scipy import stats\n",
    "\n",
    "sns.set(style='darkgrid')\n",
    "sns.set(color_codes=True)\n",
    "sns.set(font='SimHei')  # 解决Seaborn中文显示的问题\n",
    "plt.rcParams['axes.unicode_minus'] = False    # 解决保存图像是负号'-'显示为方块"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  绘制单变量分布\n",
    "\n",
    "快速查看seaborn中单变量分布的最便捷的方法是 **distplot()** 函数。默认情况下，这将绘制直方图并拟合一条概率密度曲线(KDE)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x18b457d5130>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD5CAYAAADcDXXiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de3RU5aE28GfPTGYmyUySSTK5X0hCAokEEgEhiIKALShV8VYVadcn9Hj72i7KWfVzrbPariXt17M+TyullSNL1GNt7SnoUVuQCkQR0nCRECASyAVyD8lMbpO5ZK77+4NiQZJMLjOz5/L81nIpYc+ex1ye7Hnn3e8riKIogoiIwopM6gB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PPPoPBYMDevXuRkZGB//iP/5A61k3uv/9+/PjHP8Zjjz0GlUqFn/zkJ1JHGtVrr7321X9v374dmZmZ0/qlyeUHKCJwYTuKNCx3ihhc2I4iCcudiCgMReQ8dyKicMdyJyIKQyx3IqIwxHInIgpDLHciojD0/wEx/Bi1zhV7awAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.random.normal(size=100)\n",
    "sns.distplot(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- **直方图**\n",
    "\n",
    "您可能已经很熟悉直方图，并且 **matplotlib** 中已经存在一个 **hist** 函数。直方图通过沿数据范围形成 bin，然后绘制条形图以显示落在每个 bin 中的观测次数来表示数据的分布。\n",
    "\n",
    "为了说明这点，我们把上图中的概率密度曲线去掉，并添加刻度，每一次观测就绘制一个小刻度。您可以使用 **rugplot()** 函数绘制地毯图，也可以在 **distplot** 中使用它："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x18b4ac7e1f0>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAD5CAYAAADREwWlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAPu0lEQVR4nO3dXWwUZd/H8d+2W1tKC5ZmoSKPCanRB21UNBgTEgjWExptMCpYKwe8xlQQk/WQRKVoiPGApokhinDgS8gTiSGKN0kTQoIEW5Ao0uBbE4M+Vikt8e7uwnZ3u/eBaV3Kvt+7M/13v5+EZGd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8ioOAJC/vE6nBINB3XbbbZIkj8ejUChU0KIAANnJK8Rramp07do/91sIBAIFKwgAkL28QvyBBx7QV199JUn65ZdfVFdXV9CiAADZyeuceCwWU3t7u5qamvT111/r6aefVnt7ezHqAwCkkVeIS9LY2JiOHz8un8+nhx56qNB1AQCykHeIAwDcxxWbAGAYIQ4AhhHiAGDYjAnxL774Qs8884yee+457d69W6V2qv/06dPatGmT22XAQZFIRFu2bFFvb6/bpTgqEAjohRde0MaNG/XUU0/p4sWLbpfkqhkR4uFwWJ9//rk+/PBDffzxxzp37py+//57t8tyTE9Pj/bt26exsTG3S3Fcqd6ILRqNqqOjQ4ODg26X4rgjR46otbVVBw4c0Isvvqju7m63S3LVjAjxyspKvfPOO6qsrFQ0GtXo6Kjq6+vdLssxS5Ys0RtvvOF2GY5LvBHb5s2b1dXV5XZJjurs7FRTU5PbZTiuvb1dLS0tkqTh4WHNnz/f5YrcldddDN322muvaWBg4Ib3urq6NG/ePL3//vtatWrVjN2wqcZeivevOXXqlB5//HGVl5frkUce0Ztvvul2SY7xer1qaGhwuwxXjYyM6ODBg9q/f7/bpbjKbIgnc/LkSZ08eVIHDhxwtiAHpRp7KYZ4MBjUPffcI4kbsZWaSCQiv98vv9+vhQsXul2Oq0yGeDLnzp3T3r17tX//ft1yyy1ulwMHcCO20hSLxeT3+9Xc3Kzm5ma3y3HdjDgnLkk7duxQIBBQR0eH2tradPr0abdLQpFxI7bSdPjwYZ04cUJHjx5VW1ub/H6/2yW5isvuYRY3YgMIcRjHjdhQ6ghxADBsxpwTB4BSRIgDgGGEOAAYRogDgGGEOAAY9h+bYHZzHAFOlQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.distplot(x, kde=False, rug=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "当绘制直方图时，您主要的选择的分箱的数量以及在哪里绘制它。**displot()** 用简单的规则来很好的决定默认使用多少数量的分箱，但是尝试更多的或者更少的分箱可能揭示数据中其他的特征。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x18b4ad06820>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAD5CAYAAADREwWlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAARzklEQVR4nO3dfWyTdb/H8U+7bh1zlcBSBugfKsYwQ4JGSUz8w5D5j0ZJFIGbp5iAJGRIiE7iAyYaQUOMRggeooSHGB40RyESgeM5GEKymDGMxCcC4T6ceCCKUDYi6zq6tuv545zujNl27a/XVr/r+5WY9OH3vX7f39X2w3X3Xq/Ll06n0wIAmOQvdwMAAHeEOAAYRogDgGGEOAAYRogDgGGEOAAYRogDgGGBckx67VqP+vu9/fP0hoZ6dXZGPd2mJZW8ftbO2sc6v9+nCRNuyfpcWUK8vz/teYhntlvJKnn9rL0yVfLaM/g6BQAMI8QBwDBCHAAMI8QBwLCCQjyRSGjFihXq6OiQJB05ckTz5s3TokWLtGHDBnEiRAAoj2H/OiWZTKqlpUWXLl2SJMXjcR06dEh79uxRMBjU008/rbNnz6qpqWnEmwUA3KygI/H169drxowZkqRgMKitW7cqGAwqmUyqu7tbDQ0NI9okACC7YY/EA4GAJk+enPW5HTt2aPbs2Zo0aVJRkzY01Bc1vlDhcGhEtmvFWFl/d6xPvTeSBY+/0hWTqqokSeNqAwrV1YxUa39LY+V1d1HJa89w/rFPW1ub2tratHPnzqJrOzujnv+RfjgcUiTS7ek2LRlL6++JJ/XdmcsFjw/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473Jhsc2XbB/nWnKvHbH3k29fZtjP0PZLrtR2u50x9Ia/b0HWMCwYG5h66n/Lti1yvVaHvy6E9Z+stn0CV3zkHMvWD3/OFzpupzfe5KLS2WJMmjHNec746XzqdThe7wS1btmjChAlasmSJ0um05syZo6+++sqpOQCAO6evU3p6ejRlyhRJks/nUywW87QpAEBhnEK8vr5evb3/f76FaDTqWUMAgMI5hfh9992nEydOSJJ+/fVXTZgwwdOmAACFcfpOPJVKafHixZoxY4a+//57PfPMM1q8ePFI9AcAyMMpxCWpr69Px44dUzgc1gMPPOB1XwCAAjiHOACg/PjFJgAYRogDgGGEOAAYNmZC/MiRI5o3b54WLVqkDRs2qNK+6m9vb9fy5cvL3QZGUSKR0IoVK9TR0VHuVkZVNBrVypUrtWzZMs2dO1dnzpwpd0tlNSZCPB6P69ChQ9qzZ4/27dunU6dO6ezZs+Vua9QcPXpUH330kfr6+srdyqir1BOxJZNJtbS06NKlS+VuZdQdPHhQc+bM0c6dO7Vq1Spt2bKl3C2V1ZgI8WAwqK1btyoYDCqZTKq7u1sNDQ3lbmvUNDU16e233y53G6Nu8InYnnvuOW3evLncLY2q9evXa8aMGeVuY9QtXrxYjz/+uCSps7NTkyZNKnNH5eV0FsNye/PNN3X+/PmbHtu8ebMmTpyoHTt2aPbs2WP2hc219ko8f823336rJ554QlVVVXrooYf0zjvvlLulURMIBDR58uRyt1FWXV1d2rVrl7Zv317uVsrKbIhn09bWpra2Nu3cuXN0GxpFudZeiSHe09Oje++9VxInYqs0iURCra2tam1t1dSpU8vdTlmZDPFsTp06pU2bNmn79u2qqakpdzsYBZyIrTKlUim1traqublZzc3N5W6n7MbEd+KStGbNGkWjUbW0tGjhwoVqb28vd0sYYZyIrTLt379fx48f1+HDh7Vw4UK1traWu6Wy4mf3MIsTsQGEOIzjRGyodIQ4ABg2Zr4TB4BKRIgDgGGEOAAYRogDgGGEOAAY9j+UW607zNNDfwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.distplot(x, bins=20, kde=False, rug=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 绘制双变量分布"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 可视化数据集中的成对关系"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
